package mybatis.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import mybatis.entity.UserEntity;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author jackcfan
 * @date 22/8/31
 */
public interface UserMapper extends BaseMapper<UserEntity> {

  @Select("select * from user where id = #{id}")
  UserEntity queryById(@Param("id") Long id);

  @Select("select * from user where name=#{name}")
  List<UserEntity> queryByName(String name);
}
